import request from '@/utils/request'

export const getGoods = () => {
  return request.get('/home/category/head')
}
export const getbanner = () => {
  return request.get('/home/banner')
}
export const getnew = () => {
  return request.get('/home/new')
}
export const gethot = () => {
  return request.get('/home/hot')
}
export const getbrand = () => {
  return request.get('/home/brand')
}
//细节
export const getdetail = (id) => {
  return request.get(`/goods`, {
    params: {
      id
    }
  })
}
//二级页面
export const getSubCategoryAPI = (data) => {
  return request({
    url: '/category/goods/temporary',
    method: 'POST',
    data
  })
}
